package com.qiyu.controller.backend;

import com.qiyu.common.R;
import com.qiyu.constant.AuthRole;
import com.qiyu.entity.ResortOverview;
import com.qiyu.model.request.backend.ResortOverviewReq;
import com.qiyu.service.ResortOverviewService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(AuthRole.ADMIN + "/resortoverview")
@Api(tags = "度假区概况管理")
@Slf4j
public class AdminResortOverviewController {
    @Autowired
    private ResortOverviewService resortOverviewService;
    private String[] baseExcelude = new String[]{"deleted","createTime","updateTime"};
    @PostMapping("/save")
    @ApiOperation("度假区概况的查询和修改，handler:query:查询，update:修改")
    public R<ResortOverview> save(@RequestBody ResortOverviewReq req){
        return  R.ok(resortOverviewService.saves(req),baseExcelude);
    }

}
